home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 1372.ZIP / LITECOMM.ARC / LCTP.TXT < prev    next >
Text File  |  1988-06-30  |  102KB  |  3,301 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       OVERVIEW                                      OVERVIEW                                      ________
  10.  
  11.  
  12.             FEATURES            FEATURES            ________
  13.  
  14.  
  15.             The LiteComm-TP Toolbox(Tm) is a set of powerful routines
  16.             designed to provide easy access to the full capabilities of
  17.             the PC's asynchronous communications ports. In its initial
  18.             release, the LiteComm-TP ToolBox supports fully interrupt-
  19.             driven and buffered communications support on COM1 thru COM4
  20.             simultaneously. Now you can quickly incorporate
  21.             sophisticated communications support in your applications
  22.             without having in-depth knowledge of how the hardware
  23.             functions.
  24.  
  25.  
  26.             LiteComm-TP is implemented as a set of 3 units for the basic
  27.             product, with additional units providing the protocol-engine
  28.             capability.  The protocol engines are a part of the
  29.             registered version of the package.
  30.  
  31.  
  32.             The LiteComm ToolBox was originally developed in the C
  33.             language for use in CAD/CAM applications that required the
  34.             ability to have PC compatible systems communicating with a
  35.             variety of devices.  The introduction of version 4.0 of
  36.             Turbo PASCAL<> has made it possible for use to extend the
  37.             power and flexibility of the original LiteComm ToolBox(Tm)
  38.             to Turbo PASCAL programmers.
  39.  
  40.  
  41.  
  42.             THE SHAREWARE CONCEPT            THE SHAREWARE CONCEPT            _____________________
  43.  
  44.  
  45.             Shareware is a "try before you buy" means of software
  46.             distribution. If you find a shareware product useful, pay
  47.             the registration fee, and let the authors know that you
  48.             support their efforts.
  49.  
  50.  
  51.             Information Technology, Ltd., is a member of, and supports
  52.             the standards of, ASP, The Association of Shareware
  53.             Professionals.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                        Page 1
  62.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  71.  
  72.  
  73.                          LICENSE, WARRANTY AND REGISTRATION                         LICENSE, WARRANTY AND REGISTRATION                         __________________________________
  74.  
  75.  
  76.             LICENSE            LICENSE            _______
  77.  
  78.  
  79.             The LiteComm-TP ToolBox, is distributed as a shareware
  80.             product. In its shareware form, support is limited to COM1
  81.             only.  To receive the units that support the extended
  82.             features of LiteComm-TP and/or the source code for the
  83.             product, register your copy today. See the registration form
  84.             at the end of this manual.
  85.  
  86.  
  87.             Information Technology, Ltd, grants to registered users a
  88.             non-exclusive, perpetual license to the LiteComm-TP ToolBox,
  89.             subject to these terms and conditions:
  90.  
  91.  
  92.  
  93.                 1. You must treat your copy of the LiteComm-TP
  94.                    Toolbox as you would a book.  You may install
  95.                    the LiteComm-TP ToolBox on more than one
  96.                    machine, but you may use only one copy at a
  97.                    time.  If you desire, site licenses are
  98.                    available at a reduced cost.  You may make as
  99.                    many copies of the LiteComm-TP ToolBox as you
  100.                    require for the sole purpose of backup.
  101.  
  102.  
  103.                 2. You may incorporate portions of the LiteComm-TP
  104.                    ToolBox in products that you develop without the
  105.                    payment of additional royalties or license fees.
  106.                    You must include the statement 'Portions
  107.                    Copyright 1987, 1988, Information Technology,
  108.                    Ltd' in your product's documentation.
  109.  
  110.  
  111.                 3. You may copy and redistribute the shareware
  112.                    portion of the LiteComm-TP ToolBox, commonly
  113.                    known as LCOMMTP.ARC, but you may not modify in
  114.                    any way, the contents of the shareware package.
  115.                    Further, you may charge a fee for providing such
  116.                    a copy, beyond a maximum $8.00 copying or
  117.                    duplication fee, without the express, written
  118.                    consent of Information Technology, Ltd,
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                        Page 2
  128.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  137.  
  138.  
  139.                 4. You may not redistribute, in any form, the
  140.                    source code for the LiteComm-TP ToolBox.
  141.                    Further, you may not translate the source code
  142.                    for the LiteComm-TP ToolBox into any other
  143.                    language without the express, written consent of
  144.                    Information Technology, Ltd.
  145.  
  146.  
  147.                 5. Information Technology reserves the right to
  148.                    change both the LiteComm-TP ToolBox or its
  149.                    documentation without prior notice, with no
  150.                    obligation to you, the licensee.
  151.  
  152.  
  153.                 6. You agree that any disputes arising from this
  154.                    license will be subject to the laws of the state
  155.                    of Rhode Island.
  156.  
  157.  
  158.                 7. You agree to hold the developer and distributors
  159.                    of the LiteComm-TP ToolBox harmless for any
  160.                    damages, either direct or consequential, that
  161.                    might arise from the use of this product.
  162.  
  163.  
  164.                 8. You acknowledge that the LiteComm-TP ToolBox,
  165.                    libraries, source code, and documentation are
  166.                    the copyrighted property of Information
  167.                    Technology, Ltd.
  168.  
  169.  
  170.                 9. By your use of the LiteComm-TP ToolBox, you
  171.                    acknowledge that you have read, and understand
  172.                    the terms and conditions of this license.
  173.  
  174.  
  175.             WARRANTY            WARRANTY            ________
  176.  
  177.  
  178.             The LiteComm-TP ToolBox is distributed as-is and without
  179.             warranty, including, but not limited to, the implied
  180.             warranties of merchantability and fitness for a particular
  181.             purpose.
  182.  
  183.  
  184.             Information Technology, Ltd does warrant the distribution
  185.             media for a period of 30 days.  During that period,
  186.             Information Technology, Ltd will replace the distribution
  187.             media or provide a refund at its option.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                        Page 3
  194.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  203.  
  204.  
  205.             REGISTERING YOUR COPY            REGISTERING YOUR COPY            _____________________
  206.  
  207.             Registration of your copy of the LiteComm-TP ToolBox
  208.             provides you with several benefits:
  209.  
  210.  
  211.                 1. Puts you on our mailing list for low-cost
  212.                    updates, enhancements, and alert bulletins when
  213.                    they occur.
  214.  
  215.  
  216.                 2. Gives you access to telephone support. Sorry,
  217.                    but we cannot provide support by telephone to
  218.                    unregistered user's of the ToolBox. Unregistered
  219.                    users can leave EMAIL on Compuserve to
  220.                    70166,1152; on GEnie to I.TECH; and on DELPHI to
  221.                    RBMACE. We will respond to EMAIL on an as-
  222.                    available basis.
  223.  
  224.  
  225.                 3.Helps to further the shareware concept.
  226.  
  227.             To register your copy, use the form at the end of this
  228.             documentation. You may also register on-line through
  229.             Compuserve, GEnie, or DELPHI, using EMAIL.
  230.  
  231.  
  232.  
  233.             NOTE            NOTE            ____
  234.  
  235.             LiteComm-TP is a package undergoing continuing development.
  236.             Registered users of the product receive, in addition to the
  237.             fully-functional base package, units that provide protocol
  238.             engines supporting XModem, Windowed XModem, and YModem
  239.             protocols.
  240.  
  241.             We plan to follow these with similar engines for CompuServe
  242.             B, Telink, and other protocols. These engines, as they are
  243.             released, will only be made available to registered ToolBox
  244.             users. The shareware version, as enhanced but without the
  245.             protocol engines, will continue to be offered.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                                        Page 4
  260.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  269.  
  270.  
  271.                              COMMUNICATIONS AND THE PC                             COMMUNICATIONS AND THE PC                             _________________________
  272.  
  273.  
  274.             PC SHORTCOMINGS            PC SHORTCOMINGS            _______________
  275.  
  276.  
  277.             This section is intended as a mini-tutorial on            ______________________________________________
  278.             communications concepts. We encourage you to read it,            _____________________________________________________
  279.             although it is not strictly necessary to do so.            _______________________________________________
  280.  
  281.  
  282.             The IBM-PC, and its close compatibles, is a generally well
  283.             thought-out, flexible, and well-executed computer.
  284.             Unfortunately, not as much can be said for the thought which
  285.             was given to the software which is meant to provide access
  286.             to that hardware. One of the shortcomings which is most
  287.             noticeable is in the support, or rather lack of it, that is
  288.             provided to handle access to the serial port. Support for
  289.             the serial port is limited by the BIOS to polled mode only,
  290.             i.e. a program must interrogate the port on a regular basis
  291.             to avoid losing received characters, and to check to
  292.             determine whether or not the port is ready to send a
  293.             character. Not only is this mode of operation primitive; it
  294.             also tends to cause complications when attempting to perform
  295.             any but the simplest of tasks, at slow speeds.
  296.  
  297.  
  298.             A novice might think that the hardware, in some way, is the
  299.             limiting factor. In fact, everything that is needed,
  300.             hardware-wise, to support a more sophisticated method of
  301.             handling the serial port is already there. All that is
  302.             missing is the software follow-through. The LiteComm-TP
  303.             ToolBox provides this missing software.
  304.  
  305.  
  306.  
  307.             THE 8250 UART            THE 8250 UART            _____________
  308.  
  309.  
  310.             The term serial port comes from the fact that both incoming
  311.             and outgoing characters entering and leaving the port do so
  312.             in a bitwise fashion. When we send a character out the
  313.             serial port, the responsible circuitry sends out information
  314.             one bit at a time. When we receive a character, this
  315.             circuitry accepts the individual bits and reassembles them
  316.             into a recognizable character. These very complex operations
  317.             are performed automatically by the 8250 UART (Universal
  318.             Asynchronous Receiver-Transmitter).
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                        Page 5
  326.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  335.  
  336.  
  337.             The 8250 UART is a fully programmable device that permits
  338.             independent control of the various parameters that affect
  339.             serial communications, i.e. baud rate, parity, number of
  340.             data bits, and number of stop bits. The 8250 also optionally
  341.             supports four types of interrupts, error/break detection,
  342.             modem status change detection, transmitter ready, and
  343.             received character ready. The LiteComm-TP ToolBox fully
  344.             supports all four type of interrupts.
  345.  
  346.  
  347.             The term asynchronous implies that there is no absolute                     asynchronous                                                       ____________                                  
  348.             timing associated with the transmission of information.
  349.             Instead, the clocking-in of the data bits is done by                         clocking-in                                                     ___________                            
  350.             counting the bits. The first bit sent or received is call
  351.             the start bit and signals the beginning of a new character.
  352.             The individual data bits follow the start bit which are
  353.             clocked out and in at the specified data rate, with the
  354.             least significant bit transferred first and the parity bit,
  355.             if present, transferred last. Finally one or more stop bits
  356.             follow, signalling the end of the character.
  357.  
  358.  
  359.             The 8250 UART takes care of all of the mechanics associated
  360.             with the process described in the preceding paragraph. The
  361.             UART will also detect and report error which may occur in
  362.             the process. For example, if the parity bit is incorrect,
  363.             the UART reports the fact. If too few or too many bits are
  364.             received, the UART will report a framing error or overrun
  365.             error respectively.
  366.  
  367.  
  368.             Since the transmission of information may depend on complex
  369.             interactions with another device, such as a modem or
  370.             computer, the 8250 can also report on the status of the
  371.             handshaking lines used to provide information about the            handshaking                                                        ___________                                            
  372.             status of the connection with the other device. These
  373.             signals are explained below.
  374.  
  375.                                 SIGNAL DESCRIPTIONS
  376.                                           
  377.                   CTS      Clear To Send   The other device will accept
  378.                                            a transmission.
  379.             
  380.                   DSR      Data Set Ready  The other device is enabled.
  381.             
  382.                   RI       Ring Indicator  Usually reserved for modems
  383.                                            only. The phone is ringing
  384.             
  385.                   DCD      Carrier Detect  Usually reserved for modems.
  386.                                            The other modem's
  387.                                             carrier signal was detected.
  388.  
  389.  
  390.  
  391.                                        Page 6
  392.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  401.  
  402.  
  403.             The units for the LiteComm-TP ToolBox contains the various
  404.             bit masks required for you to make use of the information
  405.             provided by the 8250 UART.
  406.  
  407.  
  408.  
  409.             TOOLBOX NOTES AND WARNINGS            TOOLBOX NOTES AND WARNINGS            __________________________
  410.  
  411.  
  412.             Before you can send or receive information on a serial port
  413.             using the ToolBox, you must use the open function to enable
  414.             the line. This function initializes the 8250 UART with the
  415.             correct parameters, and introduces the UART into the
  416.             interrupt structure of the PC. The ToolBox will detect, and
  417.             report, any errors that you may make in selecting the port
  418.             or specifying the initial parameters. The ToolBox cannot and
  419.             will not detect an attempt to open a non-existent serial
  420.             port.
  421.  
  422.  
  423.             The ToolBox interfaces directly with the interrupt structure
  424.             of the PC. It is critical that, before exiting a program
  425.             that has opened a serial port that the serial port is closed
  426.             with the close function. If you exit your program without
  427.             closing the port, you may cause your system to crash since
  428.             the interrupt vector for the port might point to a section
  429.             of memory that no longer contains the needed code to support
  430.             the interrupt.  As an alternative, Turbo PASCAL permits you
  431.             to install one or more exit handlers (see the PASCAL
  432.             reference).  You may use this approach to provide a safe
  433.             shutdown, but be follow carefully Borland's recommendations
  434.             about implementing exit handlers.
  435.  
  436.  
  437.             Failure of the open function can be the result of either
  438.             improper parameters to the open function, or insufficient
  439.             memory available to allocate the requested buffers and
  440.             related control structures for the port. Memory for the
  441.             transmit and receive buffers as well as the port control
  442.             block are allocated from the heap. It is your responsibility
  443.             to insure that adequate memory is available for this
  444.             purpose.
  445.  
  446.  
  447.             Unless you are very familiar with the interrupt structure of
  448.             the PC, do not attempt to manipulate the interrupt enable
  449.             flag outside of the ToolBox. The ToolBox sets and clears the
  450.             interrupt enable flag at appropriate times and assumes that
  451.             it has sole control over the flag.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                        Page 7
  458.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  467.  
  468.  
  469.             Unless otherwise specified, all library functions have been
  470.             compiled with the default structure alignment, i.e. the
  471.             structure alignment switch has not been used in creating the
  472.             ToolBox library.
  473.  
  474.  
  475.  
  476.                                 LITECOMM-TP HISTORY                                LITECOMM-TP HISTORY                                ___________________
  477.  
  478.  
  479.             VERSION 1.0            VERSION 1.0            ___________
  480.  
  481.  
  482.             Version 1.0 is the first version of LiteComm-TP to be
  483.             offered to the general public, although there have been 2
  484.             Beta releases prior to Version 1.0 release.  Version 1.0 is
  485.             the functional equivalent of the original LiteComm ToolBox,
  486.             version 2.5. At present, Windowed XModem is still under
  487.             development
  488.  
  489.  
  490.  
  491.             VERSION 2.0            VERSION 2.0            ___________
  492.  
  493.  
  494.             Version 2.0 represent some major tuning to the heart of
  495.             LiteComm-TP, the kernel routines.  In version 2.0, the
  496.             kernel routines have been tightened and made more efficient,
  497.             resulting in improved reliability of LiteComm-TP at higher
  498.             baud rates than before.
  499.  
  500.  
  501.             In addition new functionality has been added in the support
  502.             of Break Detection.  The ModemStatus function has also been
  503.             enhanced to make it simpler to use.  Finally, with version
  504.             2.0, we have introduced support for the Windowed XModem
  505.             protocol, and we have also added additional support to the
  506.             existing engines in the nature of a user-written 'hook' that
  507.             permits a limited view of the engine in operation.
  508.  
  509.  
  510.             Finally, several minor bugs have been corrected that were
  511.             detected in version 1.o of the product.
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.                                        Page 8
  524.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  533.  
  534.  
  535.                                     BEYOND COM2                                    BEYOND COM2                                    ___________
  536.  
  537.  
  538.             THE TOOLBOX METHODOLOGY            THE TOOLBOX METHODOLOGY            _______________________
  539.  
  540.  
  541.             In the design of the original PC, and in subsequent
  542.             variations such as the PC/AT, there were only provision for
  543.             two serial ports. Many manufacturers of add-in products,
  544.             both serial ports and internal modems have added the
  545.             capability to support 1 or more additional ports beyond the
  546.             COM2 limit. Generally, this can cause problems in the PC
  547.             since there is no room in the interrupt request scheme for
  548.             additional levels of interrupts, and there are no designated
  549.             interrupt vectors for other additional ports.
  550.  
  551.  
  552.             The ToolBox approach to resolving these issues is to permit
  553.             the programmer a degree of control over the parameters that
  554.             govern the interrupt mechanism for COM3 and COM4.
  555.             Specifically, these parameters are: 1) the interrupt request
  556.             (IRQ) bit that is used to mask the 8259 interrupt
  557.             controller; 2) the interrupt vector number (not address) to
  558.             which the port is attached; and 3) the base i/o register for
  559.             the port itself. Of course, it is assumed that the port is
  560.             based upon the 8250 UART or compatible device.
  561.  
  562.  
  563.             Before you attempt to use COM3 and/or COM4, you must
  564.             determine from the port's documentation, the appropriate
  565.             values for these three parameters. As distributed, the
  566.             ToolBox assumes the following:
  567.  
  568.             
  569.             
  570.                                      COM3         COM4                                     ____         ____
  571.             
  572.                         IRQ Bit      4            3
  573.                         Vector #     0Ch          0Bh
  574.                         Base Reg     3E8h         2E8h
  575.  
  576.             You may change any or all of these values by using the
  577.             PortChange function described below, but only before you
  578.             open the port with CommOpen. Once the port has been opened,
  579.             PortChange is ineffective, and PortChange will not work on
  580.             COM1 or COM2.
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                        Page 9
  590.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  599.  
  600.  
  601.             CAUTIONS            CAUTIONS            ________
  602.  
  603.  
  604.             There is an intimate relationship between the IRQ setting
  605.             and the interrupt vector to which it relates. In the PC,
  606.             this relationship is controlled, in part, by the 8259
  607.             interrupt controller that is set during BIOS initialization.
  608.  
  609.  
  610.             In brief, the BIOS settings for the PC (and most close
  611.             compatibles) establish IRQ0 as being vector number 08h, and
  612.             subsequent IRQ levels at increasing vector numbers. These
  613.             vector numbers (or types in INTEL terms) act as a cpu-
  614.             directed call table to locations in the lowest 1K of system
  615.             memory. We can alter how the system responds to a given
  616.             interrupt by replacing or changing the values in the
  617.             associated vector position to point to a routine which we
  618.             supply.
  619.  
  620.  
  621.             COM3 and COM4 share two critical parameters with COM1 and
  622.             COM2 respectively, the IRQ bit and the interrupt vector
  623.             number. If you intend to use COM1 with COM3 or COM2 with
  624.             COM4 simultaneously, you must change the BOTH the vector
  625.             number and the IRQ for COM3 or COM4 to an unused or un-
  626.             needed vector. The ability for your add-on ports to handle
  627.             such a change is highly hardware dependent, so check your
  628.             port's documentation carefully. Failure to do so will result
  629.             in loss of data at best, and a system lockup at worst.
  630.  
  631.  
  632.             Judging from the questions asked by some users of LiteComm-
  633.             TP, there is evidently some mis-understanding about using
  634.             ports beyond COM2, and how this all relates to your
  635.             hardware. Before you can successfully use COM3 or COM4, you
  636.             must consider the following:
  637.  
  638.  
  639.  
  640.                 1. Does the hardware permit a change to the base
  641.                    port and/or the interrupt vector to which the
  642.                    port responds.  Some expansion cards will
  643.                    support changing one and not the other, giving
  644.                    rise to potential hardware conflicts and lost
  645.                    data.
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                                       Page 10
  656.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  665.  
  666.  
  667.                 2. Does the hardware permit  re-assignment of the
  668.                    IRQ priority. Some expansion cards permit you to
  669.                    alter the IRQ priority, some won't. Suffice it
  670.                    to say from the previous discussion the any
  671.                    change to the IRQ priority must allow a
  672.                    corresponding change to the interrupt vector
  673.                    number. Without this capability, reprogramming
  674.                    of the 8259 chip would be required.
  675.  
  676.  
  677.                 3. In fact, many add-on cards permit this dual
  678.                    change simply by making a single switch or
  679.                    jumper setting. Unfortunately, the documentation
  680.                    for these cards  generally assume that you are
  681.                    aware of the dual nature of the IRQ vector
  682.                    relationship, and may leave you with the
  683.                    impression that you are changing one and not the
  684.                    other. In most circumstances, this is not the
  685.                    case.
  686.  
  687.             The point to all of this is that LiteComm-TP can only
  688.             provide as much support as the hardware permits, or is
  689.             capable of responding to. If you wish to use other than the
  690.             default base port, interrupt vector, or irq priority for
  691.             COM3 or COM4, then your expansion card must be capable of
  692.             supporting the new values; in other words, these values are
  693.             all hardware-provided, and are recognized by the LiteComm-TP
  694.             software. If your hardware does not permit changing a value,
  695.             LiteComm-TP cannot improve the situation.
  696.  
  697.  
  698.             We should, at this point, add one final caution about how
  699.             interrupt priorities function, and their relationship to the
  700.             irq bit the you may select. The standard PC permits 8
  701.             interrupt priority levels, with the programmable timer
  702.             having the highest priority, and the parallel printer port
  703.             having the lowest priority. When an interrupt occurs, the
  704.             interrupt controller (8259 chip) masks out all other
  705.             interrupts from the priority of the interrupting device and
  706.             all lower priority devices.
  707.  
  708.  
  709.             As an aid to making COM3 and COM4 "fit", LiteComm-TP will
  710.             support, in a future release,  interrupt chaining for the
  711.             COM3 and COM4 ports. If you use COM3 or COM4, when an
  712.             interrupt occurs, the kernel will attempt to determine if
  713.             the interrupt was caused by the supported port or from some
  714.             other source.
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                                       Page 11
  722.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  731.  
  732.  
  733.             If the kernel determines that the supported port did not
  734.             cause the interrupt, an automatic chain to the original
  735.             interrupt handler for that interrupt level (IRQ level) will
  736.             take place, allowing you to "patch in" or share the
  737.             available interrupt vectors.
  738.  
  739.  
  740.             If you intend to use other than the provided defaults, be
  741.             sure that you understand the interrupt mechanism. The use of
  742.             the automatic chaining described above can be particularly
  743.             troublesome under some circumstances, resulting in loss of
  744.             interrupts and, potentially, a system crash.
  745.  
  746.  
  747.  
  748.                                   PACKAGE CONTENTS                                  PACKAGE CONTENTS                                  ________________
  749.  
  750.             Your distribution diskette contains several files that are
  751.             important to you. All distribution diskettes, at a minimum,
  752.             include the following files in the diskette's root
  753.             directory:
  754.  
  755.             
  756.                         PSERIAL.NUM       SERIAL NUMBER OF THIS COPY
  757.                         READ.ME           LATEST INFORMATION ABOUT
  758.                                           LITECOMM-TP
  759.             
  760.                         LTCOMM.ARC        SHAREWARE VERSION AND
  761.                                           DOCUMENTATION FILES
  762.             
  763.                         LTUNITS.ARC       FULLY FUNCTIONAL UNIT FILES
  764.             
  765.             If you registered for the source code modules, the diskette
  766.             contains 2 additional source code archives.
  767.             
  768.             
  769.                         LITECOMM-TP SOURCE CODE     LTSRC.ARC
  770.             
  771.                         XMODEM ENGINE SOURCE CODE   LTXMSRC.ARC
  772.             
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.                                       Page 12
  788.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  797.  
  798.  
  799.             INSTALLATION INSTRUCTIONS            INSTALLATION INSTRUCTIONS            _________________________
  800.  
  801.  
  802.             In the following discussion, we assume that your regular            ________________________________________________________
  803.             unit files are contained in a directory called \TP.                                                           \TP             ___________________________________________________
  804.  
  805.  
  806.             To install the unit files used with LiteComm-TP, perform the
  807.             following steps:
  808.  
  809.  
  810.  
  811.                 1. CD \TP
  812.  
  813.  
  814.                 2. ARC E A:LTUNITS
  815.  
  816.             Since Turbo PASCAL permits you the flexibility of having a
  817.             separate sub-directory for units, you should execute the
  818.             above instructions in whatever directory you use for units.
  819.  
  820.  
  821.             If you are installing only the units, this completes the
  822.             installation procedure. If you have registered for the
  823.             package's source code, we recommend that you create a
  824.             separate sub-directory.  The example below assumes that you
  825.             will use a directory named COMM to hold the LiteComm-TP and
  826.             XModem source code modules. To install the LiteComm-TP
  827.             source code, do the following:
  828.  
  829.  
  830.  
  831.                 1. MD \COMM
  832.  
  833.  
  834.                 2. CD \COMM
  835.  
  836.  
  837.                 3. ARC E A:LTSRC *.*
  838.  
  839.  
  840.                 4. ARC E A:LTXMSRC *.*
  841.  
  842.             We strongly urge that you use the recommended approach in
  843.             handling the source code to avoid naming conflicts that
  844.             might arise.
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.                                       Page 13
  854.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  863.  
  864.  
  865.                                    GENERAL NOTES                                   GENERAL NOTES                                   _____________
  866.  
  867.             In the discussion of the various functions which follow, you
  868.             should assume that any references to the 'port' variable
  869.             refer to a variable or constant that may take on a value of
  870.             from 1 to 4. No other values are acceptable, and will be
  871.             rejected.
  872.  
  873.  
  874.             While we feel that LiteComm-TP is written in the most
  875.             efficient way possible, commensurate with good programming
  876.             practice, we cannot be responsible for variations caused by
  877.             hardware configurations or other factors beyond our control.
  878.             LiteComm-TP has been tested, and is known to perform on, the
  879.             IBM PC-AT and several compatible systems such as the Zenith
  880.             and Wyse equivalents. LiteComm-TP has not been tested in
  881.             environments in which other software, most significantly TSR
  882.             (terminate and stay resident) modules exist. Some TSR
  883.             programs that "steal" interrupts for their own purposes
  884.             present an unfavorable environment to other programs that
  885.             rely on the interrupt structure of the computer.
  886.  
  887.  
  888.             Should you experience erratic behavior with LiteComm-TP in a
  889.             TSR-type situation, try executing your application without
  890.             the TSR module being present. If the problems you have
  891.             experienced disappear, suspect the TSR module.
  892.  
  893.  
  894.             Conversely, LiteComm-TP provides an excellent vehicle for
  895.             supporting TSR programs that you may write. Since the
  896.             package is fully reentrant, your only concern need be with
  897.             those aspects of TSR programs are of normal concern, e.g.
  898.             the non-reentrant nature of DOS. LiteComm-TP never uses DOS
  899.             functions and may therefore be safely used in a TSR
  900.             environment.
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.                                       Page 14
  920.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  929.  
  930.  
  931.                           PROCEDURE AND FUNCTION REFERENCE                          PROCEDURE AND FUNCTION REFERENCE                          ________________________________
  932.  
  933.             In the following pages, we provide the detailed information
  934.             about each of the available LiteComm-TP ToolBox functions
  935.             and procedures.  Each definition includes, at a minimum, a
  936.             summary of how the function or procedure is referenced, in
  937.             which unit the function or procedure is found, a description
  938.             of what the function or procedure does, and an indication of
  939.             those values, if any, that might be returned.
  940.  
  941.  
  942.             Where appropriate, we include additional documentation about
  943.             the function.  Some definitions include examples, in the
  944.             sense of code fragments illustrating the function's usage.
  945.             More importantly, some definitions include additional notes
  946.             and warnings as well as references to other functions within
  947.             the package.
  948.  
  949.  
  950.             We have made every effort to insure that the documentation
  951.             of the functions is complete and accurate.  The style and
  952.             manner of the documentation assumes that the reader is
  953.             thoroughly familiar with the elements of C syntax and common
  954.             conventions.
  955.  
  956.  
  957.  
  958.             UNIT USAGE            UNIT USAGE            __________
  959.  
  960.  
  961.             To assist you in developing your own applications, you will
  962.             need to know the following information.
  963.  
  964.  
  965.                            Unit           Uses
  966.             
  967.                            LctKrnl        DOS
  968.                            LctSupp        DOS, LctKrnl
  969.                            LctHayes       DOS, LctSupp
  970.                            LcTimer        DOS *
  971.                            LTXMKrnl       DOS, LctSupp, LcTimer *
  972.                            LTXModem       DOS, LctSupp, LTXMKrnl
  973.                                           LcTimer *
  974.             
  975.             * This unit part of registered version only.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.                                       Page 15
  986.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  995.  
  996.            _______________________________________________________________
  997.  
  998.                  PortChange function               LctKrnl                 PortChange function               LctKrnl
  999.            _______________________________________________________________
  1000.  
  1001.  
  1002.             FUNCTION            FUNCTION            ________
  1003.  
  1004.             Changes one or more of the critical parameters for port COM3
  1005.             or COM4.
  1006.  
  1007.  
  1008.  
  1009.             DECLARATION            DECLARATION            ___________
  1010.  
  1011.                  Portchange(CPort:integer; NewBase:word; NewIrq,
  1012.                     NewVector:byte)
  1013.  
  1014.  
  1015.             RESULT TYPE            RESULT TYPE            ___________
  1016.  
  1017.                  boolean
  1018.  
  1019.  
  1020.  
  1021.             REMARKS            REMARKS            _______
  1022.  
  1023.  
  1024.             This function must be used before the port is opened to be
  1025.             effective. To leave any of the parameters at its default
  1026.             value, make the corresponding entry 0. Note that vector is a
  1027.             vector number, not an address or pointer.
  1028.  
  1029.  
  1030.             The irq parameter should not be taken to be the irq
  1031.             (interrupt request number), but rather the irq mask. For
  1032.             example, the correct value for irq4 is NOT 4, but a byte in
  1033.             which bit 4, using INTEL's bit numbering, is set to a value
  1034.             of 1. Thus, to use irq priority 4 as the irq for either COM3
  1035.             or COM4, you would specify $10 as the value of irq when
  1036.             calling PortChange.
  1037.  
  1038.  
  1039.             If you intend to change the default irq settings, you MUST
  1040.             also make a corresponding change to the vector number. See
  1041.             the preceding section about using COM3 and COM4 for
  1042.             additional details. Failure to follow this rule may make the
  1043.             port appear to be non-functional.
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                                       Page 16
  1052.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1061.  
  1062.  
  1063.             The PortChange function does NOT check to determine that you
  1064.             have provided both an IRQ mask AND a new vector number.
  1065.  
  1066.  
  1067.             PortChange returns a value of TRUE if the change was
  1068.             successful, false otherwise.
  1069.  
  1070.  
  1071.  
  1072.             EXAMPLE            EXAMPLE            _______
  1073.  
  1074.                  Var
  1075.                     Newbase : word;
  1076.                     Newirq : byte;
  1077.                     NewVector : byte;
  1078.                     
  1079.                     Begin
  1080.                       Newbase := $03E8;
  1081.                       Newirq := $10;
  1082.                       NewVector := $0C;
  1083.                     
  1084.                       if PortChange(3, Newbase, Newirq, NewVector)
  1085.                     then
  1086.                       Writeln('Port 3 Changed')
  1087.                     else
  1088.                       Writeln('Error changing Port 3');
  1089.                     end;
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.                                       Page 17
  1118.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1127.  
  1128.            _______________________________________________________________
  1129.  
  1130.                  CommOpen function                 LctKrnl                 CommOpen function                 LctKrnl
  1131.            _______________________________________________________________
  1132.  
  1133.  
  1134.             FUNCTION            FUNCTION            ________
  1135.  
  1136.             Prepares the specified port for use by the other functions
  1137.  
  1138.  
  1139.  
  1140.             DECLARATION            DECLARATION            ___________
  1141.  
  1142.                  CommOpen(CPort, Baud:integer; Parity:char;
  1143.                     Databits, Stopbits, InSize, OutSize:integer)
  1144.  
  1145.  
  1146.             RESULT TYPE            RESULT TYPE            ___________
  1147.  
  1148.                  boolean
  1149.  
  1150.  
  1151.  
  1152.             REMARKS            REMARKS            _______
  1153.  
  1154.             Opens the specified port for use and attaches an interrupt
  1155.             handler to DOS for the port. The function allocates buffers
  1156.             for input and output of the specified sizes, and sets the
  1157.             port to the parameters specified. The minimum value for
  1158.             InSize is 128; the minimum size for OutSize is 64. A port
  1159.             opened in this manner must be closed using CommClose before
  1160.             program termination to avoid the possibility of a system
  1161.             crash.
  1162.  
  1163.  
  1164.             The parameters passed to the function are discrete values,
  1165.             and must be drawn from the following lists:
  1166.  
  1167.  
  1168.             Baud: any value that your communication equipment, e.g. your
  1169.             modem, will support.
  1170.             Parity: E, O, N, M, S
  1171.                  E - Even
  1172.                  O - Odd
  1173.                  N - None
  1174.                  M - Mark
  1175.                  S - Space
  1176.             Databits: 5, 6, 7, 8
  1177.             StopBits: 1, 2
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.                                       Page 18
  1184.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1193.  
  1194.  
  1195.             A return of TRUE indicates the port has been successfully
  1196.             opened and is ready for use.  A return of FALSE indicates an
  1197.             error occurred, either as the result of an invalid
  1198.             parameter, or insufficient heap space available to allocate
  1199.             the buffers and control structures for the port.
  1200.  
  1201.  
  1202.  
  1203.             EXAMPLE            EXAMPLE            _______
  1204.  
  1205.                  Var
  1206.                     Baud, Databits, Stopbits : integer;
  1207.                     Parity : char;
  1208.                     Insize, Outsize : integer;
  1209.                     
  1210.                     begin
  1211.                       Baud := 2400;
  1212.                       Parity := 'E';
  1213.                       Databits := 7;
  1214.                       Stopbits := 1;
  1215.                       Insize := 256;
  1216.                       Outsize := 256;
  1217.                     
  1218.                       if CommOpen(1, Baud, Parity, Databits,
  1219.                     Stopbits, Insize, Outsize) then
  1220.                            Writeln('COM1 available for use')
  1221.                       else
  1222.                            Writeln('Error opening COM1');
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                                       Page 19
  1250.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1259.  
  1260.            _______________________________________________________________           _______________________________________________________________
  1261.  
  1262.                CommClose procedure                           LctKrnl               CommClose procedure                           LctKrnl
  1263.            _______________________________________________________________           _______________________________________________________________
  1264.  
  1265.  
  1266.             FUNCTION            FUNCTION            ________
  1267.  
  1268.             Closes a port that has been opened by the CommOpen function
  1269.  
  1270.             DECLARATION            DECLARATION            ___________
  1271.  
  1272.             CommClose(CPort:integer)
  1273.  
  1274.  
  1275.  
  1276.             REMARKS            REMARKS            _______
  1277.  
  1278.             This function is the companion to CommOpen and, in effect,
  1279.             performs the opposite action. CommClose detaches the kernel
  1280.             interrupt handler from the port, and reconnects the previous
  1281.             interrupt handler. CommClose also release dynamically
  1282.             allocated memory used for buffering and control structures.
  1283.             Failure to call CommClose before terminating a program may
  1284.             result in unexplained system crashes or hangs.
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.                                       Page 20
  1316.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1325.  
  1326.            _______________________________________________________________           _______________________________________________________________
  1327.  
  1328.                CommSetup function                            LctKrnl               CommSetup function                            LctKrnl
  1329.            _______________________________________________________________           _______________________________________________________________
  1330.  
  1331.  
  1332.             FUNCTION            FUNCTION            ________
  1333.  
  1334.             Provides the capability of changing the parameters for an
  1335.             open port, without breaking the connection or closing the
  1336.             port.
  1337.  
  1338.  
  1339.  
  1340.             DECLARATION            DECLARATION            ___________
  1341.  
  1342.             CommSetup(CPort, Baud:integer; Parity:char; Databits,
  1343.             Stopbits:integer)
  1344.  
  1345.  
  1346.  
  1347.             RESULT TYPE            RESULT TYPE            ___________
  1348.                  boolean
  1349.  
  1350.  
  1351.             REMARKS            REMARKS            _______
  1352.  
  1353.             The CommSetup function is a subset of the CommOpen function
  1354.             and the remarks made in the description of CommOpen apply.
  1355.             This function is useful if you wish to change the basic
  1356.             communication parameters of the specified port that has
  1357.             already been opened without CommClose'ing the port and
  1358.             breaking the connection.
  1359.  
  1360.  
  1361.  
  1362.             SEE ALSO            SEE ALSO            ________
  1363.  
  1364.                  CommOpen
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                                       Page 21
  1382.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1391.  
  1392.            _______________________________________________________________           _______________________________________________________________
  1393.  
  1394.                ValidatePort function                         LctKrnl               ValidatePort function                         LctKrnl
  1395.            _______________________________________________________________           _______________________________________________________________
  1396.  
  1397.  
  1398.             FUNCTION            FUNCTION            ________
  1399.  
  1400.             Verifies that the specified port has been opened and returns
  1401.             a pointer to the Communications Control Block for the port.
  1402.  
  1403.  
  1404.  
  1405.             DECLARATION            DECLARATION            ___________
  1406.  
  1407.             ValidatePort(CPort:integer)
  1408.  
  1409.  
  1410.  
  1411.             RESULT TYPE            RESULT TYPE            ___________
  1412.  
  1413.                  CCBPTR
  1414.  
  1415.  
  1416.  
  1417.             REMARKS            REMARKS            _______
  1418.  
  1419.             Used internally to validate that the port number specified
  1420.             is correct and has been opened with the CommOpen function.
  1421.             May be of use to you in writing certain applications that
  1422.             require access to the Communications Control Block.  The
  1423.             function returns a value of NIL if the specified port is
  1424.             incorrect or not open.
  1425.  
  1426.  
  1427.  
  1428.             EXAMPLE            EXAMPLE            _______
  1429.  
  1430.                  if ValidatePort(2) = NIL then
  1431.                       Writeln('The port has been opened')
  1432.                     else
  1433.                       Writeln('The port is nor presently open');
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.                                       Page 22
  1448.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1457.  
  1458.            _______________________________________________________________           _______________________________________________________________
  1459.  
  1460.                BytesInInput function                         LctSupp               BytesInInput function                         LctSupp
  1461.            _______________________________________________________________           _______________________________________________________________
  1462.  
  1463.  
  1464.             FUNCTION            FUNCTION            ________
  1465.  
  1466.             Returns the number of characters currently available in the
  1467.             input buffer (BytesInInput) or the number of untransmitted
  1468.             characters in the output buffer (ByteInOutput).
  1469.  
  1470.  
  1471.  
  1472.             DECLARATION            DECLARATION            ___________
  1473.  
  1474.             BytesInInput(CPort:integer)
  1475.             BytesInOutput(CPort:integer)
  1476.  
  1477.  
  1478.  
  1479.             RESULT TYPE            RESULT TYPE            ___________
  1480.  
  1481.                  integer
  1482.  
  1483.  
  1484.  
  1485.             REMARKS            REMARKS            _______
  1486.  
  1487.             May be used to determine the number of characters currently
  1488.             in the input (BytesInInput) or output (BytesInOutput)
  1489.             buffers for the port. In the event of an error (bad port), a
  1490.             value of -1 is returned.
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.                                       Page 23
  1514.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1523.  
  1524.            _______________________________________________________________           _______________________________________________________________
  1525.  
  1526.                ModemStatus function                          LctKrnl               ModemStatus function                          LctKrnl
  1527.            _______________________________________________________________           _______________________________________________________________
  1528.  
  1529.  
  1530.             FUNCTION            FUNCTION            ________
  1531.  
  1532.             Returns the last know status of the modem control lines for
  1533.             the specified port.
  1534.  
  1535.  
  1536.  
  1537.             DECLARATION            DECLARATION            ___________
  1538.  
  1539.             ModemStatus(CPort:integer)
  1540.  
  1541.  
  1542.  
  1543.             RESULT TYPE            RESULT TYPE            ___________
  1544.  
  1545.                  byte
  1546.  
  1547.  
  1548.  
  1549.             REMARKS            REMARKS            _______
  1550.  
  1551.             Use this function to determine the last known state of the
  1552.             modem-supplied handshake signals. These may be tested using
  1553.             the values included in the unit, using PASCAL's bitwise AND
  1554.             operator.  NOTE: The byte value returned can be viewed as
  1555.             consisting of two sub-fields, the current signal state
  1556.             (found in the high order 4 bits of the byte), and the signal
  1557.             change(DELTA) indicators(found in the low-order 4 bits of
  1558.             the byte).  Whenever this function is called, both subfields
  1559.             are returned, and represent the current state of the
  1560.             individual signals.  The DELTA settings may be all reset, if
  1561.             no signals have changed since the last call to the function.
  1562.             The signals which are tracked are CTS, DSR, RI, and DCD.
  1563.  
  1564.  
  1565.             To determine which signals, if any, have changed use the
  1566.             DeltaXXX bits returned. For example, if CTS has changed, the
  1567.             DeltaCTS bit will be set.  The actual CTS value (on or off)
  1568.             will be found in the CTS bit of the returned byte.
  1569.  
  1570.  
  1571.             In the event of an error, a byte of $00 is returned.
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.                                       Page 24
  1580.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1589.  
  1590.  
  1591.             HINT            HINT            ____
  1592.  
  1593.             Detecting a ringing phone (using the RI signal) can be
  1594.             tricky and timing dependent.  One nearly foolproof method
  1595.             that we have used is to examine the DeltaRI value, not the
  1596.             RI value.  The DeltaRI value is set and reset as the
  1597.             telephone starts and stops ringing.  The RI value is set and
  1598.             cleared independantly, and you may miss the fact that the
  1599.             phone is ringing if you don't examine the value at the right
  1600.             time.
  1601.  
  1602.  
  1603.  
  1604.             EXAMPLE            EXAMPLE            _______
  1605.  
  1606.                  Var
  1607.                     CStat : byte;
  1608.                     
  1609.                     begin
  1610.                       CStat := ModemStatus(1);
  1611.                       if CStat and DeltaCTS = DeltaCTS then
  1612.                         if CStat and CTS <> CTS then
  1613.                            Writeln('The connection is broken');
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.                                       Page 25
  1646.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1655.  
  1656.            _______________________________________________________________           _______________________________________________________________
  1657.  
  1658.                BreakRecd function                            LctKrnl               BreakRecd function                            LctKrnl
  1659.            _______________________________________________________________           _______________________________________________________________
  1660.  
  1661.  
  1662.             FUNCTION            FUNCTION            ________
  1663.  
  1664.             Returns a value of true if a BREAK signal has been received
  1665.             from the serial port since that last call to the function.
  1666.  
  1667.  
  1668.  
  1669.             DECLARATION            DECLARATION            ___________
  1670.  
  1671.                  BreakRecd(CPort:integer);
  1672.  
  1673.  
  1674.  
  1675.             RESULT TYPE            RESULT TYPE            ___________
  1676.  
  1677.                  boolean;
  1678.  
  1679.  
  1680.  
  1681.             REMARKS            REMARKS            _______
  1682.  
  1683.             This function returns a value of TRUE if a BREAK character
  1684.             has been received since the last call to the function.
  1685.  
  1686.  
  1687.  
  1688.             EXAMPLE            EXAMPLE            _______
  1689.  
  1690.                       if BreakRecd(2) then
  1691.                         Writeln('Break Signal detected on Port 2');
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.                                       Page 26
  1712.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1721.  
  1722.            _______________________________________________________________           _______________________________________________________________
  1723.  
  1724.                ErrorStatus function                          LctKrnl               ErrorStatus function                          LctKrnl
  1725.            _______________________________________________________________           _______________________________________________________________
  1726.  
  1727.  
  1728.             FUNCTION            FUNCTION            ________
  1729.  
  1730.             Return the last known error status for the specified port.
  1731.  
  1732.  
  1733.  
  1734.             DECLARATION            DECLARATION            ___________
  1735.  
  1736.             ErrorStatus(CPort:integer)
  1737.  
  1738.  
  1739.  
  1740.             RESULT TYPE            RESULT TYPE            ___________
  1741.  
  1742.                  byte
  1743.  
  1744.  
  1745.  
  1746.             REMARKS            REMARKS            _______
  1747.  
  1748.             Returns the last known state of the serial port's error
  1749.             status bits, encoded in a byte. These may be tested using
  1750.             the constants defined in the unit in conjunction with
  1751.             PASCAL's bitwise AND operator.  The applicable values that
  1752.             may be checked are OverRun, BadParity, and, BadFrame.  Break
  1753.             detection, i.e. the receipt of a BREAK character, is handled
  1754.             by the BreakRecd function(qv).  In the event of an error, a
  1755.             byte of $00 is returned.
  1756.  
  1757.  
  1758.             Once the error status bits have been read in this fashion,
  1759.             they are reset to $00, and will remain so until the next
  1760.             error occurs.  Since this process happens asynchronously, it
  1761.             is not possible for your application to determine which
  1762.             character created the error, only that the error occurred.
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.                                       Page 27
  1778.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1787.  
  1788.  
  1789.             EXAMPLE            EXAMPLE            _______
  1790.  
  1791.                  Var
  1792.                     EStat : byte;
  1793.                     
  1794.                     begin
  1795.                       EStat := ErrorStatus(2);
  1796.                       if EStat and OverRun = OverRun then
  1797.                         Writeln('Receive Character Over Run');
  1798.  
  1799.  
  1800.            _______________________________________________________________           _______________________________________________________________
  1801.  
  1802.                SetModemSignals function                      LctKrnl               SetModemSignals function                      LctKrnl
  1803.            _______________________________________________________________           _______________________________________________________________
  1804.  
  1805.  
  1806.             FUNCTION            FUNCTION            ________
  1807.  
  1808.             Allows the programmer to set the individual modem control
  1809.             lines for the specified port.
  1810.  
  1811.  
  1812.  
  1813.             DECLARATION            DECLARATION            ___________
  1814.  
  1815.             SetModemSignals(CPort:integer; NewSet:byte)
  1816.  
  1817.  
  1818.  
  1819.             RESULT TYPE            RESULT TYPE            ___________
  1820.  
  1821.                  boolean
  1822.  
  1823.  
  1824.  
  1825.             REMARKS            REMARKS            _______
  1826.  
  1827.             Set one or more of the modem control signals. Because of the
  1828.             need to always have OUT2 set for interrupt support, the
  1829.             function always provides the correct setting for this bit.
  1830.  
  1831.  
  1832.             The value of NewSet is bitwise OR'ed with the current set of
  1833.             values to produce a new modem control setting.  The value of
  1834.             NewSet DOES NOT replace the current values. Use the
  1835.             constants supplied in the unit to obtain the correct values.
  1836.             These include DTR and RTS.
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.                                       Page 28
  1844.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1853.  
  1854.  
  1855.             EXAMPLE            EXAMPLE            _______
  1856.  
  1857.                  begin
  1858.                     if SetModemSignals(1, (DTR and RTS)) then
  1859.                       Writeln('Port is ready to transmit')
  1860.                     else
  1861.                       Writeln('Unable to set modem signals');
  1862.  
  1863.  
  1864.             SEE ALSO            SEE ALSO            ________
  1865.  
  1866.                  ClearModemSignals, FlipModemSignals
  1867.  
  1868.  
  1869.  
  1870.            _______________________________________________________________           _______________________________________________________________
  1871.  
  1872.                ClearModemSignals function                    LctKrnl               ClearModemSignals function                    LctKrnl
  1873.            _______________________________________________________________           _______________________________________________________________
  1874.  
  1875.  
  1876.             FUNCTION            FUNCTION            ________
  1877.  
  1878.             Allows the programmer to clear (reset) the individual modem
  1879.             control lines for the specified port.
  1880.  
  1881.  
  1882.  
  1883.             DECLARATION            DECLARATION            ___________
  1884.  
  1885.             ClearModemSignals(CPort:integer; NewSet:byte)
  1886.  
  1887.  
  1888.  
  1889.             RESULT TYPE            RESULT TYPE            ___________
  1890.  
  1891.                  boolean
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.                                       Page 29
  1910.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1919.  
  1920.  
  1921.             REMARKS            REMARKS            _______
  1922.  
  1923.             Clears (resets) one or more of the modem control signals.
  1924.             Because of the need to always have OUT2 set for interrupt
  1925.             support, the function always provides the correct setting
  1926.             for this bit.
  1927.  
  1928.  
  1929.             The compliment of NewSet is bitwise AND'ed with the current
  1930.             set of values to produce a new modem control setting.  The
  1931.             value of NewSet DOES NOT replace the current values. Use the
  1932.             constants supplied in the unit to obtain the correct values.
  1933.             These include DTR and RTS.
  1934.  
  1935.  
  1936.  
  1937.             EXAMPLE            EXAMPLE            _______
  1938.  
  1939.                  begin
  1940.                     if ClearModemSignals(1,  RTS) then
  1941.                       Writeln('RTS for Port 1 has been dropped')
  1942.                     else
  1943.                       Writeln('Unable to clear RTS');
  1944.  
  1945.  
  1946.             SEE ALSO            SEE ALSO            ________
  1947.  
  1948.                  SetModemSignals, FlipModemSignals
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.                                       Page 30
  1976.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  1985.  
  1986.            _______________________________________________________________           _______________________________________________________________
  1987.  
  1988.                FlipModemSignals function                     LctKrnl               FlipModemSignals function                     LctKrnl
  1989.            _______________________________________________________________           _______________________________________________________________
  1990.  
  1991.  
  1992.             FUNCTION            FUNCTION            ________
  1993.  
  1994.             Allows the programmer to compliment(toggle) the individual
  1995.             modem control lines for the specified port.
  1996.  
  1997.  
  1998.  
  1999.             DECLARATION            DECLARATION            ___________
  2000.  
  2001.             FlipModemSignals(CPort:integer; NewSet:byte)
  2002.  
  2003.  
  2004.  
  2005.             RESULT TYPE            RESULT TYPE            ___________
  2006.  
  2007.                  boolean
  2008.  
  2009.  
  2010.  
  2011.             REMARKS            REMARKS            _______
  2012.  
  2013.             Complements(toggles) one or more of the modem control
  2014.             signals. Because of the need to always have OUT2 set for
  2015.             interrupt support, the function always provides the correct
  2016.             setting for this bit.
  2017.  
  2018.  
  2019.             The value of NewSet is bitwise XOR'ed with the current set
  2020.             of values to produce a new modem control setting.  The value
  2021.             of NewSet DOES NOT replace the current values. Use the
  2022.             constants supplied in the unit to obtain the correct values.
  2023.             These include DTR and RTS.
  2024.  
  2025.  
  2026.  
  2027.             EXAMPLE            EXAMPLE            _______
  2028.  
  2029.                  begin
  2030.                     if FlipModemSignals(1, RTS) then
  2031.                       Writeln('RTS for Port 1 has been changed')
  2032.                     else
  2033.                       Writeln('Unable to change RTS');
  2034.  
  2035.  
  2036.             SEE ALSO            SEE ALSO            ________
  2037.  
  2038.                  SetModemSignals, ClearModemSignals
  2039.  
  2040.  
  2041.                                       Page 31
  2042.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2051.  
  2052.            _______________________________________________________________           _______________________________________________________________
  2053.  
  2054.                EnableXon function                            LctKrnl               EnableXon function                            LctKrnl
  2055.            _______________________________________________________________           _______________________________________________________________
  2056.  
  2057.  
  2058.             FUNCTION            FUNCTION            ________
  2059.  
  2060.             Enable or disable the semi-automatic flow control features
  2061.             of LiteComm-TP
  2062.  
  2063.  
  2064.  
  2065.             DECLARATION            DECLARATION            ___________
  2066.  
  2067.             EnableXon(CPort:integer; XonFlag:boolean)
  2068.  
  2069.  
  2070.  
  2071.             RESULT TYPE            RESULT TYPE            ___________
  2072.  
  2073.                  boolean;
  2074.  
  2075.  
  2076.  
  2077.             DESCRIPTION            DESCRIPTION            ___________
  2078.  
  2079.             If XonFlag is TRUE, turns on semi-automatic XON-XOFF flow
  2080.             control function. If XonFlag is FALSE (the default setting),
  2081.             automatic flow control is disabled. When enabled, the kernel
  2082.             will automatically transmit an XOFF if and when the input
  2083.             buffer is approximately 2/3 full and will automatically
  2084.             recognize an XOFF sent by the companion system. If the
  2085.             companion system transmits an XOFF, the kernel will refuse
  2086.             to send any characters until the condition is cleared.
  2087.  
  2088.  
  2089.             It is the programmer's responsibility to transmit XON when
  2090.             conditions permit. See the XoffSent function to tell if an
  2091.             automatic XOFF has been sent by the kernel. See the XoffRecd
  2092.             function to determine if the kernel has detected an XOFF.
  2093.  
  2094.  
  2095.             If you intended to implement a protocol that might include
  2096.             the XON-XOFF characters, be sure to disable the automatic
  2097.             flow control. Failure to do so may result in a system hang.
  2098.  
  2099.  
  2100.  
  2101.             SEE ALSO            SEE ALSO            ________
  2102.  
  2103.                  XoffRecd, XoffRecd
  2104.  
  2105.  
  2106.  
  2107.                                       Page 32
  2108.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2117.  
  2118.            _______________________________________________________________           _______________________________________________________________
  2119.  
  2120.                XoffRecd function                             LctKrnl               XoffRecd function                             LctKrnl
  2121.            _______________________________________________________________           _______________________________________________________________
  2122.  
  2123.  
  2124.             FUNCTION            FUNCTION            ________
  2125.  
  2126.             Reports whether or not the kernel has detected an XOFF from
  2127.             the companion system
  2128.  
  2129.  
  2130.  
  2131.             DECLARATION            DECLARATION            ___________
  2132.  
  2133.             XoffRecd(CPort:integer)
  2134.  
  2135.  
  2136.  
  2137.             RESULT TYPE            RESULT TYPE            ___________
  2138.  
  2139.                  boolean
  2140.  
  2141.  
  2142.  
  2143.             REMARKS            REMARKS            _______
  2144.  
  2145.             Returns TRUE if an XOFF has been received, FALSE otherwise.
  2146.             If an XOFF has been received, the port's flag will be reset,
  2147.             and transmission to the companion system will be permitted.
  2148.             If an XON is received from the companion system, the port's
  2149.             flag will also be reset, permitting further transmissions to
  2150.             occur. Be aware that if the companion system never sends an
  2151.             XON after sending an XOFF, a possible race condition may                                                  race                                                                ____              
  2152.             occur, resulting in a system hang.
  2153.  
  2154.  
  2155.  
  2156.             SEE ALSO            SEE ALSO            ________
  2157.  
  2158.                  EnableXon, XoffSent
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.                                       Page 33
  2174.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2183.  
  2184.            _______________________________________________________________           _______________________________________________________________
  2185.  
  2186.                XoffSent function                             LctKrnl               XoffSent function                             LctKrnl
  2187.            _______________________________________________________________           _______________________________________________________________
  2188.  
  2189.  
  2190.             FUNCTION            FUNCTION            ________
  2191.  
  2192.             Reports whether or not the kernel has automatically sent an
  2193.             XOFF to the companion system.
  2194.  
  2195.  
  2196.  
  2197.             DECLARATION            DECLARATION            ___________
  2198.  
  2199.             XoffSent(CPort:integer)
  2200.  
  2201.  
  2202.  
  2203.             RESULT TYPE            RESULT TYPE            ___________
  2204.  
  2205.                  boolean
  2206.  
  2207.  
  2208.  
  2209.             REMARKS            REMARKS            _______
  2210.  
  2211.             Returns TRUE if the kernel has sent an XOFF to the companion
  2212.             system, FALSE otherwise. If an XOFF has been sent, the
  2213.             port's flag will be reset. You must send an XON character to
  2214.             the companion system to permit transmissions to proceed.
  2215.  
  2216.  
  2217.  
  2218.             SEE ALSO            SEE ALSO            ________
  2219.  
  2220.                  EnableXon, XoffRecd
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                                       Page 34
  2240.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2249.  
  2250.            _______________________________________________________________           _______________________________________________________________
  2251.  
  2252.                LctGet function                               LctSupp               LctGet function                               LctSupp
  2253.            _______________________________________________________________           _______________________________________________________________
  2254.  
  2255.  
  2256.             FUNCTION            FUNCTION            ________
  2257.  
  2258.             Returns an available character from the ports input buffer.
  2259.  
  2260.  
  2261.  
  2262.             DECLARATION            DECLARATION            ___________
  2263.  
  2264.             LctGet(CPort:integer; var Ch:byte)
  2265.  
  2266.  
  2267.  
  2268.             RESULT TYPE            RESULT TYPE            ___________
  2269.  
  2270.                  boolean
  2271.  
  2272.  
  2273.  
  2274.             REMARKS            REMARKS            _______
  2275.  
  2276.             Places the next available character in the input buffer for
  2277.             the port in Ch. The function returns a value of TRUE if
  2278.             there is a character available, FALSE if there is no
  2279.             character available or on an error.  The contents of Ch are
  2280.             undefined when the return is FALSE.
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.                                       Page 35
  2306.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2315.  
  2316.            _______________________________________________________________           _______________________________________________________________
  2317.  
  2318.                LctPeek function                              LctSupp               LctPeek function                              LctSupp
  2319.            _______________________________________________________________           _______________________________________________________________
  2320.  
  2321.  
  2322.             FUNCTION            FUNCTION            ________
  2323.  
  2324.             Permits you to look at the next character in the ports input
  2325.             buffer without removing if from the buffer.
  2326.  
  2327.  
  2328.  
  2329.             DECLARATION            DECLARATION            ___________
  2330.  
  2331.             LctPeek(CPort:integer; var Ch:byte)
  2332.  
  2333.  
  2334.  
  2335.             RESULT TYPE            RESULT TYPE            ___________
  2336.  
  2337.                  boolean
  2338.  
  2339.  
  2340.  
  2341.             REMARKS            REMARKS            _______
  2342.  
  2343.             Places the next available character in the input buffer for
  2344.             the specified port into the Ch variable, but does not remove
  2345.             the character from the buffer. This allows the application
  2346.             to look-ahead by one character in a non-destructive fashion.               look-ahead                                                              __________                                               
  2347.             Returns FALSE if the port is not active, or if there are no
  2348.             characters in the port's buffer, TRUE otherwise. The
  2349.             contents of Ch are undefined when the result is FALSE
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.                                       Page 36
  2372.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2381.  
  2382.            _______________________________________________________________           _______________________________________________________________
  2383.  
  2384.                LctPut function                               LctSupp               LctPut function                               LctSupp
  2385.            _______________________________________________________________           _______________________________________________________________
  2386.  
  2387.  
  2388.             FUNCTION            FUNCTION            ________
  2389.  
  2390.             Places a character in the port's transmit buffer to be sent
  2391.             when the port is ready.
  2392.  
  2393.  
  2394.  
  2395.             DECLARATION            DECLARATION            ___________
  2396.  
  2397.             LctPut(CPort:integer; Ch:byte)
  2398.  
  2399.  
  2400.  
  2401.             RESULT TYPE            RESULT TYPE            ___________
  2402.  
  2403.                  boolean
  2404.  
  2405.  
  2406.  
  2407.             REMARKS            REMARKS            _______
  2408.  
  2409.             Returns TRUE if successful. Note that this does not
  2410.             guarantee that the character has been sent, only that no
  2411.             errors were detected. Returns FALSE if the port is not
  2412.             active, or if there no room in the port's buffer.
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.                                       Page 37
  2438.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2447.  
  2448.            _______________________________________________________________           _______________________________________________________________
  2449.  
  2450.                GetStream function                            LctSupp               GetStream function                            LctSupp
  2451.            _______________________________________________________________           _______________________________________________________________
  2452.  
  2453.  
  2454.             FUNCTION            FUNCTION            ________
  2455.  
  2456.             Gets a stream of N characters from the port's input buffer
  2457.  
  2458.  
  2459.  
  2460.             DECLARATION            DECLARATION            ___________
  2461.  
  2462.             GetStream(CPort:integer; var Buff; BCnt:integer)
  2463.  
  2464.  
  2465.  
  2466.             RESULT TYPE            RESULT TYPE            ___________
  2467.  
  2468.                  integer
  2469.  
  2470.  
  2471.  
  2472.             REMARKS            REMARKS            _______
  2473.  
  2474.             Reads a stream of, at most, BCnt characters from the serial
  2475.             port's input buffer into the Buff array. Returns the count
  2476.             of characters actually transferred, or -1 if an error
  2477.             occurs. NOTE that Buff is an array of characters or bytes,
  2478.             not a string, although you may treat a string variable like
  2479.             an array, as shown below.
  2480.  
  2481.  
  2482.  
  2483.             EXAMPLE            EXAMPLE            _______
  2484.  
  2485.                  Type
  2486.                     MaxStr = string[256];
  2487.                     
  2488.                     Var
  2489.                       StrBuff : MaxStr;
  2490.                       RecdLen : integer;
  2491.                     
  2492.                     begin
  2493.                       RecdLen := GetStream(2, StrBuff[1], 256);
  2494.                       if RecdLen <M=> 0 then     { error or no char
  2495.                     }
  2496.                         StrBuff[0] := 0
  2497.                       else
  2498.                         StrBuff[0] := Chr(RecdLen);
  2499.                     end;
  2500.  
  2501.  
  2502.  
  2503.                                       Page 38
  2504.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2513.  
  2514.            _______________________________________________________________           _______________________________________________________________
  2515.  
  2516.                PutStream function                            LctSupp               PutStream function                            LctSupp
  2517.            _______________________________________________________________           _______________________________________________________________
  2518.  
  2519.  
  2520.             FUNCTION            FUNCTION            ________
  2521.  
  2522.             Places a stream of, at most, N characters in the port's
  2523.             transmit buffer.
  2524.  
  2525.  
  2526.  
  2527.             DECLARATION            DECLARATION            ___________
  2528.  
  2529.             PutStream(CPort:integer; var Buff; BCnt:integer)
  2530.  
  2531.  
  2532.  
  2533.             RESULT TYPE            RESULT TYPE            ___________
  2534.  
  2535.                  integer
  2536.  
  2537.  
  2538.  
  2539.             REMARKS            REMARKS            _______
  2540.  
  2541.             Buff is an array of character or byte, not a string,
  2542.             although it is possible to specify a string variable, using
  2543.             the same approach as outlined for the GetStream function.
  2544.             PutStream returns the number of characters actually placed
  2545.             into the buffer. Note that this does not guarantee that the
  2546.             characters have been sent. A value of 0 will be returned if
  2547.             any error occurs, or if there no room in the port's buffer.
  2548.  
  2549.  
  2550.  
  2551.             SEE ALSO            SEE ALSO            ________
  2552.  
  2553.                  PutStream
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.                                       Page 39
  2570.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2579.  
  2580.            _______________________________________________________________           _______________________________________________________________
  2581.  
  2582.                Buffer Flushing functions                     LctSupp               Buffer Flushing functions                     LctSupp
  2583.            _______________________________________________________________           _______________________________________________________________
  2584.  
  2585.  
  2586.             FUNCTION            FUNCTION            ________
  2587.             Provides several high level buffer management functions to
  2588.             control the contents of the port's transmit and receive
  2589.             buffers
  2590.  
  2591.  
  2592.             DELCLARATION            DELCLARATION            ____________
  2593.  
  2594.             function PurgeTxBuff(CPort:integer)
  2595.             
  2596.             function PurgeRxBuff(CPort:integer)
  2597.             
  2598.             procedure FlushUntilMatch(CPort:integer; Ch:byte)
  2599.             
  2600.             procedure FlushNBytes(CPort:integer; N:integer);
  2601.  
  2602.  
  2603.  
  2604.             RESULT TYPE            RESULT TYPE            ___________
  2605.  
  2606.                  boolean for PurgeTxBuff, PurgeRxBuff
  2607.  
  2608.  
  2609.  
  2610.             REMARKS            REMARKS            _______
  2611.  
  2612.             The PurgeRxBuff and PurgeTxBuff functions remove all
  2613.             characters from the port's receive and transmit buffers
  2614.             respectively and discard them; untransmitted characters in
  2615.             the transmit buffer are NEVER sent; unprocessed characters
  2616.             in the receive buffer are lost.  Both functions return a
  2617.             value of TRUE if no errors were encountered, FALSE
  2618.             otherwise.  An empty buffer is NOT considered an error.
  2619.  
  2620.  
  2621.             The FlushUntilMatch procedure will continually dispose of
  2622.             received characters until the character Ch is received. The
  2623.             procedure will return when the character Ch is detected, or
  2624.             when there are no more characters in the port's input
  2625.             buffer.
  2626.  
  2627.  
  2628.             The FlushNBytes procedure removes, at most, N characters
  2629.             from the port's receive buffer.
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.                                       Page 40
  2636.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2645.  
  2646.            _______________________________________________________________           _______________________________________________________________
  2647.  
  2648.                SendBreak function                            LctKrnl               SendBreak function                            LctKrnl
  2649.            _______________________________________________________________           _______________________________________________________________
  2650.  
  2651.  
  2652.             FUNCTION            FUNCTION            ________
  2653.  
  2654.             Send a true Break signal
  2655.  
  2656.  
  2657.  
  2658.             DECLARATION            DECLARATION            ___________
  2659.  
  2660.             SendBreak(CPort:integer)
  2661.  
  2662.  
  2663.  
  2664.             RESULT TYPE            RESULT TYPE            ___________
  2665.  
  2666.                  boolean
  2667.  
  2668.  
  2669.  
  2670.             REMARKS            REMARKS            _______
  2671.  
  2672.             SendBreak generates a BREAK signal using a particular
  2673.             characteristic of the 8250 UART to generate an accurate
  2674.             BREAK at any baud rate.  BREAKS generated in this manner are
  2675.             timed based upon the baud rate at which the 8250 is
  2676.             currently initialized.  This function may or may not work
  2677.             correctly with other than the actual 8250 UART.
  2678.  
  2679.  
  2680.             Returns TRUE if successful. Returns FALSE if an error is
  2681.             detected.
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.                                       Page 41
  2702.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2711.  
  2712.  
  2713.             
  2714.  
  2715.  
  2716.            _______________________________________________________________           _______________________________________________________________
  2717.  
  2718.                HAYES MODEM FUNCTIONS                        LctHayes               HAYES MODEM FUNCTIONS                        LctHayes
  2719.            _______________________________________________________________           _______________________________________________________________
  2720.  
  2721.  
  2722.             FUNCTION            FUNCTION            ________
  2723.  
  2724.             Provides support for various aspects of modems the support
  2725.             the Hayes(Tm) command set.
  2726.  
  2727.  
  2728.  
  2729.             DECLARATIONS            DECLARATIONS            ____________
  2730.  
  2731.                  const
  2732.                       NUMRES = 0     { numeric result codes}
  2733.                       WRDRES = 1     { word result codes }
  2734.                       SPKOFF = 0     { speaker off }
  2735.                       SPKON  = 1     { speaker on until CD }
  2736.                       SPKSPC = 2     { speaker always on }
  2737.                       ONHK   = 0     { go on-hook (hang up) }
  2738.                       OFFHK  = 1     { go off-hook (lift receiver)
  2739.                     }
  2740.                       OFFHKS = 2     { go off-hook, don't close
  2741.                     relay }
  2742.                       BASIC  = 0     { basic result set }
  2743.                       EXSET1 = 1     { extended results, set 1 }
  2744.                       EXSET3 = 2     { extended results, set 3 }
  2745.                       EXSET4 = 3     { extended results, set 4 }
  2746.                     
  2747.  
  2748.                  type
  2749.                       TelNumStr = string[20];
  2750.                     
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.                                       Page 42
  2768.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2777.  
  2778.  
  2779.             procedure SetType(NType : byte)
  2780.             
  2781.             procedure SetSet(NSet : byte)
  2782.             
  2783.             function RetType : byte
  2784.             
  2785.             function RetSet : byte
  2786.             
  2787.             function ModemCodesOn(CPort : integer):boolean
  2788.             
  2789.             function ModemCodesOff(CPort : integer):boolean
  2790.             
  2791.             function ModemWordResponse(CPort : integer):boolean
  2792.             
  2793.             function ModemDigitResponse(CPort : integer):boolean
  2794.             
  2795.             function RepeatModemCommand(CPort : integer):boolean
  2796.             
  2797.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  2798.             
  2799.             function SetModemRegister(CPort, Reg, NValue : integer) :
  2800.             boolean
  2801.             
  2802.             function GetModemRegister(CPort, Reg, NValue : integer) :
  2803.             boolean
  2804.             
  2805.             function ModemHalfDuplex(CPort : integer) : boolean
  2806.             
  2807.             function ModemFullDuplex(CPort : integer) : boolean
  2808.             
  2809.             function ModemEchoCmd(CPort : integer) : boolean
  2810.             
  2811.             function ModemNoEchoCmd(CPort : integer) : boolean
  2812.             
  2813.             function ModemHookMode(CPort : integer; HMode : byte) :
  2814.             boolean
  2815.             
  2816.             function ModemCarrierOn(CPort : integer) : boolean
  2817.             
  2818.             function ModemCarrierOff(CPort : integer) : boolean
  2819.             
  2820.             function ModemWordResponse(CPort : integer):boolean
  2821.             
  2822.             function ModemDigitResponse(CPort : integer):boolean
  2823.             
  2824.             function RepeatModemCommand(CPort : integer):boolean
  2825.             
  2826.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  2827.             
  2828.             function SetModemRegister(CPort, Reg, NValue : integer) :
  2829.             boolean
  2830.             
  2831.  
  2832.  
  2833.                                       Page 43
  2834.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2843.  
  2844.  
  2845.             function GetModemRegister(CPort, Reg, NValue : integer) :
  2846.             boolean
  2847.             
  2848.             function ModemHalfDuplex(CPort : integer) : boolean
  2849.             
  2850.             function ModemFullDuplex(CPort : integer) : boolean
  2851.             
  2852.             function ModemEchoCmd(CPort : integer) : boolean
  2853.             
  2854.             function ModemNoEchoCmd(CPort : integer) : boolean
  2855.             
  2856.             function ModemHookMode(CPort : integer; HMode : byte) :
  2857.             boolean
  2858.             
  2859.             function ModemCarrierOn(CPort : integer) : boolean
  2860.             
  2861.             function ModemCarrierOff(CPort : integer) : boolean
  2862.             
  2863.             function ModemCodeSet(CPort : integer; NewSet : byte) :
  2864.             boolean
  2865.             
  2866.             function ModemPulse(CPort : integer) : boolean
  2867.             
  2868.             function ModemTone(CPort : integer) : boolean
  2869.             
  2870.             function ModemDial(CPort : integer; TelNo : TelNumStr) :
  2871.             boolean
  2872.  
  2873.  
  2874.  
  2875.             REMARKS            REMARKS            _______
  2876.  
  2877.             The ModemCodeSet function allows you to change the set of
  2878.             codes that are returned by the modem when an action is
  2879.             specified.
  2880.  
  2881.  
  2882.             ModemDial instructs the modem to dial the number contained
  2883.             in TelNo. Do not include the dialing (ATD) prefix, or the
  2884.             trailing <CR>. These are provided by the function. You may
  2885.             include non-numeric characters as the contents of TelNo are
  2886.             not checked. The dialing is done in the last known, pulse or
  2887.             tone, mode. If you use the Modempulse or ModemTone
  2888.             functions, then dialing will be done in the mode that was
  2889.             last correctly enabled. If you have not exercised these
  2890.             functions, then dialing occurs in the modems default or
  2891.             power-up mode.
  2892.  
  2893.  
  2894.             The ModemHalfDuplex and ModemFullDuplex functions place the
  2895.             modem into local echo and remote echo modes respectively.
  2896.  
  2897.  
  2898.  
  2899.                                       Page 44
  2900.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2909.  
  2910.  
  2911.             The GetModemRegister function requests that the modem return
  2912.             the current value of S-register Reg. Reg must be in the
  2913.             range 0 to 13. Use the GetStream, or similar function, to
  2914.             retrieve the modem's response. Specifying a register outside
  2915.             the 0 to 13 range will cause a return of FALSE.
  2916.  
  2917.  
  2918.             SetModemRegister is the companion to GetModemRegister, with
  2919.             the same restrictions. Sets the S-register Reg to the value
  2920.             contained in NValue. If NValue contains -1, then the
  2921.             register is reset to its default (power-up) value. The
  2922.             function checks the value to be certain that it is within
  2923.             the limits specified for the particular register, and
  2924.             returns a value of FALSE if the value is outside the
  2925.             predefined limits.
  2926.  
  2927.  
  2928.             ModemCarrierOff enables modem carrier detect, but disables
  2929.             the modems carrier signal. The ModemCarrierOn companion
  2930.             enables both carrier detect and the modems carrier signal.
  2931.             When ModemCarrierOff is used the modem will receive data but
  2932.             will be unable to send data.
  2933.  
  2934.  
  2935.             The ModemNoEchoCmd and ModemEchoCmd functions determine
  2936.             whether commands sent to the modem are echoed back to the
  2937.             sending program. With echo turned off, the modem will
  2938.             continue to accept commands, but will not try to redisplay
  2939.             the command's characters.
  2940.  
  2941.  
  2942.             ModemHookMode allows you to control the current status of
  2943.             the modem's telephone line connection. See your modem's
  2944.             documentation and the above constants for additional
  2945.             information.
  2946.  
  2947.  
  2948.             The ModemRepeatCommand function instructs the modem to
  2949.             repeat the last command sequence executed. Generally, this
  2950.             function is of greatest value in re-dialing numbers that are
  2951.             busy, although its use is not restricted to that.
  2952.  
  2953.  
  2954.             The way in which your modem responds to commands is
  2955.             determined, in part, by the ModemWordResponse and
  2956.             ModemDigitResponse functions. If you call ModemWordResponse,
  2957.             then modem responses use the English language response
  2958.             codes, e.g. CONNECT or OK. Calling ModemDigitResponse
  2959.             instructs the modem to respond with code numbers only from
  2960.             the currently selected response set, see the ModemCodeSet
  2961.             function above.
  2962.  
  2963.  
  2964.  
  2965.                                       Page 45
  2966.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  2975.  
  2976.  
  2977.             You may use the functions ModemCodesOn and ModemCodesOff to
  2978.             specify whether you want your modem to send back response
  2979.             codes when it receives a command string. In a sense, these
  2980.             act as companions to the EchoCmd functions above.
  2981.  
  2982.  
  2983.             Use the ModemSpeaker function to control the modem's
  2984.             internal speaker, if it has one. See the above constants for
  2985.             the applicable codes.
  2986.  
  2987.  
  2988.             The RetSet and RetType functions return, respectively, the
  2989.             last known command set (ModemCodeSet) and last known result
  2990.             type (ModemWordResponse, ModemDigitResponse). The RetSet and
  2991.             RetType  functions are only of value when used in
  2992.             conjunction with the companion functions.
  2993.  
  2994.  
  2995.  
  2996.             GENERAL REMARKS            GENERAL REMARKS            _______________
  2997.  
  2998.             Several considerations are in order if you intend to use the
  2999.             Hayes ToolBox functions.
  3000.  
  3001.  
  3002.  
  3003.                 1. You are responsible for checking the return
  3004.                    codes from the modem once you have given modem a
  3005.                    command. To make the task easier, we suggest
  3006.                    that you turn OFF command echo (so that you
  3007.                    don't have to worry about separating commands
  3008.                    from responses) and turn ON numeric responses
  3009.                    (to make the interpretation of result codes
  3010.                    easier and faster).
  3011.  
  3012.  
  3013.                 2. Be sure that you allow  adequate time between
  3014.                    commands for the modem to process the command
  3015.                    and respond. Failure to observe this rule may
  3016.                    result in commands being misinterpreted or
  3017.                    "lost". You can monitor the number of characters
  3018.                    in the receive buffer to help you with the
  3019.                    timing. Or alternatively, check the response
  3020.                    after each command. The latter approach is more
  3021.                    in line with what we believe to be good
  3022.                    programming practice.
  3023.  
  3024.  
  3025.             RETURN VALUES            RETURN VALUES            _____________
  3026.  
  3027.             All functions return a value of FALSE if a port or other
  3028.             error is detected, TRUE otherwise.
  3029.  
  3030.  
  3031.                                       Page 46
  3032.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3041.  
  3042.  
  3043.                            LITECOMM-TP REGISTRATION FORM                           LITECOMM-TP REGISTRATION FORM                           _____________________________
  3044.  
  3045.             Please complete the following information. Note that the
  3046.             prices below are for a single-use registration only. Please
  3047.             contact us directly for site licensing.
  3048.  
  3049.             Mail to:
  3050.                  Information Technology
  3051.                  PO Box 554
  3052.                  Coventry, RI 02816
  3053.                  Telephone Orders or Information (401) 826-2223
  3054.             
  3055.              SHIP TO:
  3056.              Name    ________________________________________
  3057.             
  3058.              Company ________________________________________
  3059.             
  3060.              Street  ________________________________________
  3061.             
  3062.                      ________________________________________
  3063.             
  3064.              City    ___________________  State __  Zip _____
  3065.             
  3066.              Telephone _______________________
  3067.             
  3068.             
  3069.                QTY     REGISTRATION TYPE   REGISTRATION FEE
  3070.             
  3071.                        LIBRARIES @ $25    
  3072.             
  3073.                        LIBRARIES AND
  3074.                        SOURCE  @ $50      
  3075.             
  3076.             RI residents, Sales Tax 6%    
  3077.             
  3078.             
  3079.             Method of Payment (Check, Mastercard, Visa) _____________
  3080.             
  3081.                  Credit Card Number __________________________
  3082.             
  3083.                  Expiration Date __________________________
  3084.             
  3085.                  Name as it appears on card ___________________________
  3086.             
  3087.                  Signature for MC/VISA ________________________________
  3088.             
  3089.             All MasterCard/Visa orders must include a telephone number,
  3090.             
  3091.             We regret that we cannot accept COD orders
  3092.             (office use only)
  3093.                 Date Received ______________ Date Sent _____________
  3094.                 Version ______________ Serial Number _______________
  3095.  
  3096.  
  3097.                                       Page 47
  3098.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                      LITECOMM-TP (tm) TOOLBOX for Turbo-PASCAL
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.                                       Page 48
  3164.                 CopyRight (c) 1987,1988 Information Technology, Ltd.
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.      8250 5, 6, 7                                              ValidatePort 22
  3173.      8259 9                                              XoffRecd     33
  3174.      Asynchronous   6                                              XoffSent     34
  3175.      BIOS 5, 10                                            Handshake 24
  3176.      BREAK     26, 27, 41                                            Handshaking    6
  3177.      BreakRecd 26                                            HAYES MODEM    42
  3178.      Buffer Flushing     40                                            Heap 7, 19
  3179.      Buffers   7, 18                                            Interrupt chaining  11
  3180.      COM3 9                                            Interrupt enable flag    7
  3181.      COM4 9                                            Interrupt vector    10
  3182.      CommOpen  9                                            Interrupt vectors   9
  3183.      Control structures  7                                            IRQ  10, 16
  3184.      CTS  24                                            IRQ0 10
  3185.      DCD  24                                            Look-ahead     36
  3186.      DeltaCTS  24                                            Open function  7
  3187.      DSR  24                                            PortChange     9
  3188.      DTR  28, 30, 31                                            Procedures
  3189.      Error status bits   27                                              CommClose    20
  3190.      Expansion cards     10                                              FlushNBytes  40
  3191.      Flow control   32                                              FlushUntilMatch   40
  3192.      Functions                                              SetSet  43
  3193.        BytesInInput 23                                              SetType 43
  3194.        ClearModemSignals 29                                            RI   24
  3195.        CommOpen     18                                            RTS  28, 30, 31
  3196.        CommSetup    21                                            S-register     45
  3197.        EnableXon    32                                            Stream    38, 39
  3198.        ErrorStatus  27                                            TSR  14
  3199.        FlipModemSignals  31                                            Vector numbers 10
  3200.        GetModemRegister  43, 44                                            XOFF 32
  3201.        GetStream    38                                            XON  32
  3202.        LctGet  35
  3203.        LctPeek 36
  3204.        LctPut  37
  3205.        ModemCarrierOff   43, 44
  3206.        ModemCarrierOn    43, 44
  3207.        ModemCodeSet 44
  3208.        ModemCodesOff     43
  3209.        ModemCodesOn 43
  3210.        ModemDial    44
  3211.        ModemDigitResponse     43
  3212.        ModemEchoCmd 43, 44
  3213.        ModemFullDuplex   43, 44
  3214.        ModemHalfDuplex   43, 44
  3215.        ModemHookMode     43, 44
  3216.        ModemNoEchoCmd    43, 44
  3217.        ModemPulse   44
  3218.        ModemSpeaker 43
  3219.        ModemStatus  24
  3220.        ModemTone    44
  3221.        ModemWordResponse 43
  3222.        PortChange   16
  3223.        PurgeRxBuff  40
  3224.        PurgeTxBuff  40
  3225.        PutStream    39
  3226.        RepeatModemCommand     43
  3227.        RetSet  43
  3228.        RetType 43
  3229.        SendBreak    41
  3230.        SetModemRegister  43
  3231.        SetModemSignals   28
  3232.  
  3233.                                           1
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.                 OVERVIEW........................................... 1
  3243.                     FEATURES....................................... 1
  3244.                     THE SHAREWARE CONCEPT.......................... 1
  3245.  
  3246.                 LICENSE, WARRANTY AND REGISTRATION................. 2
  3247.                     LICENSE........................................ 2
  3248.                     WARRANTY....................................... 3
  3249.                     REGISTERING YOUR COPY.......................... 4
  3250.                     NOTE........................................... 4
  3251.  
  3252.                 COMMUNICATIONS AND THE PC.......................... 5
  3253.                     PC SHORTCOMINGS................................ 5
  3254.                     THE 8250 UART.................................. 5
  3255.                     TOOLBOX NOTES AND WARNINGS..................... 7
  3256.  
  3257.                 LITECOMM-TP HISTORY................................ 8
  3258.                     VERSION 1.0.................................... 8
  3259.  
  3260.                 BEYOND COM2........................................ 9
  3261.                     THE TOOLBOX METHODOLOGY........................ 9
  3262.                     CAUTIONS....................................... 10
  3263.  
  3264.                 PACKAGE CONTENTS................................... 12
  3265.  
  3266.                 INSTALLATION INSTRUCTIONS.......................... 13
  3267.  
  3268.                 GENERAL NOTES...................................... 14
  3269.  
  3270.                 PROCEDURE AND FUNCTION REFERENCE................... 15
  3271.                     UNIT USAGE..................................... 15
  3272.  
  3273.                 HAYES MODEM FUNCTIONS.............................. 42
  3274.  
  3275.                 LITECOMM-TP REGISTRATION FORM...................... 47
  3276.             
  3277.              Turbo PASCAL is a registered trademark of Borland
  3278.             International
  3279.             
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.